﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace FileEncodingChanger
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter directory url");
            string directoryUrl = Console.ReadLine();

            foreach (var fileUrl in Directory.GetFiles(directoryUrl))
            {
                Console.WriteLine("Changing encoding for {0}", fileUrl);
                
                File.WriteAllText(fileUrl, File.ReadAllText(fileUrl, Encoding.Default), Encoding.UTF8);
            }
        }
    }
}
